package com.buercorp.wangyu.oop.pkgame;

import javax.naming.Name;

public class GameText {
    public static void main(String[] args) {
        Role r1 = new Role("小李", 100);
        Role r2 = new Role("小忆", 100);
        // 开始格斗 回合制
        while (true) {
            // r1 攻击 r2
            r1.attack(r2);
            if (r2.getBlood() == 0) {
                System.out.println(r1.getName() + "KO了" +r2.getName());
                break;
            }
            r2.attack(r1);
            if (r1.getBlood() == 0) {
                System.out.println(r2.getName() + "KO了" +r1.getName());
                break;
            }
        }
    }
}
